{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# vega-extension"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "from IPython.display import display\n",
    "import pandas as pd\n",
    "\n",
    "\n",
    "def Vega(spec):\n",
    "    bundle = {}\n",
    "    bundle['application/vnd.vega.v5+json'] = spec\n",
    "    display(bundle, raw=True)\n",
    "\n",
    "\n",
    "def VegaLite(spec):\n",
    "    bundle = {}\n",
    "    bundle['application/vnd.vegalite.v4+json'] = spec\n",
    "    display(bundle, raw=True)"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Vega(spec: dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "application/vnd.vega.v5+json": {
       "$schema": "https://vega.github.io/schema/vega/v5.0.json",
       "axes": [
        {
         "orient": "bottom",
         "scale": "xscale"
        },
        {
         "orient": "left",
         "scale": "yscale"
        }
       ],
       "data": [
        {
         "name": "table",
         "values": [
          {
           "amount": 28,
           "category": "A"
          },
          {
           "amount": 55,
           "category": "B"
          },
          {
           "amount": 43,
           "category": "C"
          },
          {
           "amount": 91,
           "category": "D"
          },
          {
           "amount": 81,
           "category": "E"
          },
          {
           "amount": 53,
           "category": "F"
          },
          {
           "amount": 19,
           "category": "G"
          },
          {
           "amount": 87,
           "category": "H"
          }
         ]
        }
       ],
       "height": 200,
       "marks": [
        {
         "encode": {
          "enter": {
           "width": {
            "band": 1,
            "scale": "xscale"
           },
           "x": {
            "field": "category",
            "scale": "xscale"
           },
           "y": {
            "field": "amount",
            "scale": "yscale"
           },
           "y2": {
            "scale": "yscale",
            "value": 0
           }
          },
          "hover": {
           "fill": {
            "value": "red"
           }
          },
          "update": {
           "fill": {
            "value": "steelblue"
           }
          }
         },
         "from": {
          "data": "table"
         },
         "type": "rect"
        },
        {
         "encode": {
          "enter": {
           "align": {
            "value": "center"
           },
           "baseline": {
            "value": "bottom"
           },
           "fill": {
            "value": "#333"
           }
          },
          "update": {
           "fillOpacity": [
            {
             "test": "datum === tooltip",
             "value": 0
            },
            {
             "value": 1
            }
           ],
           "text": {
            "signal": "tooltip.amount"
           },
           "x": {
            "band": 0.5,
            "scale": "xscale",
            "signal": "tooltip.category"
           },
           "y": {
            "offset": -2,
            "scale": "yscale",
            "signal": "tooltip.amount"
           }
          }
         },
         "type": "text"
        }
       ],
       "padding": 5,
       "scales": [
        {
         "domain": {
          "data": "table",
          "field": "category"
         },
         "name": "xscale",
         "padding": 0.05,
         "range": "width",
         "round": true,
         "type": "band"
        },
        {
         "domain": {
          "data": "table",
          "field": "amount"
         },
         "name": "yscale",
         "nice": true,
         "range": "height"
        }
       ],
       "signals": [
        {
         "name": "tooltip",
         "on": [
          {
           "events": "rect:mouseover",
           "update": "datum"
          },
          {
           "events": "rect:mouseout",
           "update": "{}"
          }
         ],
         "value": {}
        }
       ],
       "width": 400
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbMAAADvCAYAAAB41jq/AAAgAElEQVR4Xu2dC9BdV1XHf4W21AaKFRqslAkEIqlkCK86KeiQSHlJVbDSgRIg4pTh0WkAR3OjkAcRy0WKdng4CsTHKBSYccAUDbGUDo8IhKINtBSFpB2oIQUaCTXBUrjOcvZlvn6533f2OWfv81jnf2cY2p69197rt9Y6/7v3Pd/ZJ6GPCIiACIiACPScwEk9n7+mLwIiIAIiIAJIzJQEIiACIiACvScgMet9COWACIiACIiAxEw5IAIiIAIi0HsCErPeh1AOiIAIiIAISMyUAyIgAiIgAr0nIDHrfQjlgAiIgAiIgMRMOSACIiACItB7AhKz3odQDoiACIiACEjMlAMiIAIiIAK9JyAx630I5YAIiIAIiECsmD0AuAc4PgfZWcAZwG3hml06GVgG3AUcFl4REAEREAERaIJAkZjdF/hp4C+AtwF7w6R+Ffgr4H3ArwNPBO4G9gA3AmuB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     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Vega(\n",
    "    {\n",
    "        \"$schema\": \"https://vega.github.io/schema/vega/v5.0.json\",\n",
    "        \"width\": 400,\n",
    "        \"height\": 200,\n",
    "        \"padding\": 5,\n",
    "        \"data\": [\n",
    "            {\n",
    "                \"name\": \"table\",\n",
    "                \"values\": [\n",
    "                    {\"category\": \"A\", \"amount\": 28},\n",
    "                    {\"category\": \"B\", \"amount\": 55},\n",
    "                    {\"category\": \"C\", \"amount\": 43},\n",
    "                    {\"category\": \"D\", \"amount\": 91},\n",
    "                    {\"category\": \"E\", \"amount\": 81},\n",
    "                    {\"category\": \"F\", \"amount\": 53},\n",
    "                    {\"category\": \"G\", \"amount\": 19},\n",
    "                    {\"category\": \"H\", \"amount\": 87},\n",
    "                ],\n",
    "            }\n",
    "        ],\n",
    "        \"signals\": [\n",
    "            {\n",
    "                \"name\": \"tooltip\",\n",
    "                \"value\": {},\n",
    "                \"on\": [\n",
    "                    {\"events\": \"rect:mouseover\", \"update\": \"datum\"},\n",
    "                    {\"events\": \"rect:mouseout\", \"update\": \"{}\"},\n",
    "                ],\n",
    "            }\n",
    "        ],\n",
    "        \"scales\": [\n",
    "            {\n",
    "                \"name\": \"xscale\",\n",
    "                \"type\": \"band\",\n",
    "                \"domain\": {\"data\": \"table\", \"field\": \"category\"},\n",
    "                \"range\": \"width\",\n",
    "                \"padding\": 0.05,\n",
    "                \"round\": True,\n",
    "            },\n",
    "            {\n",
    "                \"name\": \"yscale\",\n",
    "                \"domain\": {\"data\": \"table\", \"field\": \"amount\"},\n",
    "                \"nice\": True,\n",
    "                \"range\": \"height\",\n",
    "            },\n",
    "        ],\n",
    "        \"axes\": [{\"orient\": \"bottom\", \"scale\": \"xscale\"}, {\"orient\": \"left\", \"scale\": \"yscale\"}],\n",
    "        \"marks\": [\n",
    "            {\n",
    "                \"type\": \"rect\",\n",
    "                \"from\": {\"data\": \"table\"},\n",
    "                \"encode\": {\n",
    "                    \"enter\": {\n",
    "                        \"x\": {\"scale\": \"xscale\", \"field\": \"category\"},\n",
    "                        \"width\": {\"scale\": \"xscale\", \"band\": 1},\n",
    "                        \"y\": {\"scale\": \"yscale\", \"field\": \"amount\"},\n",
    "                        \"y2\": {\"scale\": \"yscale\", \"value\": 0},\n",
    "                    },\n",
    "                    \"update\": {\"fill\": {\"value\": \"steelblue\"}},\n",
    "                    \"hover\": {\"fill\": {\"value\": \"red\"}},\n",
    "                },\n",
    "            },\n",
    "            {\n",
    "                \"type\": \"text\",\n",
    "                \"encode\": {\n",
    "                    \"enter\": {\n",
    "                        \"align\": {\"value\": \"center\"},\n",
    "                        \"baseline\": {\"value\": \"bottom\"},\n",
    "                        \"fill\": {\"value\": \"#333\"},\n",
    "                    },\n",
    "                    \"update\": {\n",
    "                        \"x\": {\"scale\": \"xscale\", \"signal\": \"tooltip.category\", \"band\": 0.5},\n",
    "                        \"y\": {\"scale\": \"yscale\", \"signal\": \"tooltip.amount\", \"offset\": -2},\n",
    "                        \"text\": {\"signal\": \"tooltip.amount\"},\n",
    "                        \"fillOpacity\": [{\"test\": \"datum === tooltip\", \"value\": 0}, {\"value\": 1}],\n",
    "                    },\n",
    "                },\n",
    "            },\n",
    "        ],\n",
    "    }\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Vega(spec: string)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "application/vnd.vega.v5+json": "https://raw.githubusercontent.com/vega/vega/master/docs/examples/bar-chart.vg.json",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbMAAADvCAYAAAB41jq/AAAgAElEQVR4Xu2dC9BdV1XHf4W21AaKFRqslAkEIqlkCK86KeiQSHlJVbDSgRIg4pTh0WkAR3OjkAcRy0WKdng4CsTHKBSYccAUDbGUDo8IhKINtBSFpB2oIQUaCTXBUrjOcvZlvn6533f2OW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tqtKfq7K3+ffjY1tCH5kz0DsBWmF/qw+TncB8Drwv/3kcf7AnA35vD3H53einwgx7FwVYFH543X4tFa1tDFdjZFyD7ImSn2fflS8R8N02I7WlAe/Wfff4EeBjwqra26CrEYf4Wu8SsAkR16S8B21e3pLc99T48idlf0pp51wnYLos9vGI7RPZIuz41CXhemdVEo+4iIAIiIAJ9ISAx60ukNE8REAEREIEFCUjMlBwiIAIiIAK9JyAx630I5YAIiIAIiIDETDkgAiIgAiLQewISs96HUA6IgAiIgAj8Hz+jAyvwKNW6AAAAAElFTkSuQmCC"
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Vega('https://raw.githubusercontent.com/vega/vega/master/docs/examples/bar-chart.vg.json')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## VegaLite(spec: dict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "application/vnd.vegalite.v4+json": {
       "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
       "data": {
        "values": [
         {
          "a": "A",
          "b": 28
         },
         {
          "a": "B",
          "b": 55
         },
         {
          "a": "C",
          "b": 43
         },
         {
          "a": "D",
          "b": 91
         },
         {
          "a": "E",
          "b": 81
         },
         {
          "a": "F",
          "b": 53
         },
         {
          "a": "G",
          "b": 19
         },
         {
          "a": "H",
          "b": 87
         },
         {
          "a": "I",
          "b": 52
         }
        ]
       },
       "description": "A simple bar chart with embedded data.",
       "encoding": {
        "x": {
         "field": "a",
         "type": "ordinal"
        },
        "y": {
         "field": "b",
         "type": "quantitative"
        }
       },
       "mark": "bar"
      },
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPYAAAD5CAYAAAAURMgdAAAWqUlEQVR4Xu2dDbBUZ3nHfwhEBJPWFsnE2iFhpZIEQ8RkhkRbuTXtWKWKY2kxRb3j1zQ1hnasfHQqH4Njs461jfFjrAnFturVtlMt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3QGDHeypFOdB1BwR214dADZAD8Q4I7HhPpSgHuu6AwO76EKgBciDeAYEd76kU5UDXHfh/uYLE2py4bCAAAAAASUVORK5CYII="
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "VegaLite(\n",
    "    {\n",
    "        \"$schema\": \"https://vega.github.io/schema/vega-lite/v4.json\",\n",
    "        \"description\": \"A simple bar chart with embedded data.\",\n",
    "        \"data\": {\n",
    "            \"values\": [\n",
    "                {\"a\": \"A\", \"b\": 28},\n",
    "                {\"a\": \"B\", \"b\": 55},\n",
    "                {\"a\": \"C\", \"b\": 43},\n",
    "                {\"a\": \"D\", \"b\": 91},\n",
    "                {\"a\": \"E\", \"b\": 81},\n",
    "                {\"a\": \"F\", \"b\": 53},\n",
    "                {\"a\": \"G\", \"b\": 19},\n",
    "                {\"a\": \"H\", \"b\": 87},\n",
    "                {\"a\": \"I\", \"b\": 52},\n",
    "            ]\n",
    "        },\n",
    "        \"mark\": \"bar\",\n",
    "        \"encoding\": {\n",
    "            \"x\": {\"field\": \"a\", \"type\": \"ordinal\"},\n",
    "            \"y\": {\"field\": \"b\", \"type\": \"quantitative\"},\n",
    "        },\n",
    "    }\n",
    ")"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## VegaLite(spec: string)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "application/vnd.vegalite.v4+json": "https://raw.githubusercontent.com/vega/vega-lite/master/examples/specs/bar.vl.json",
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPYAAAD5CAYAAAAURMgdAAAWqUlEQVR4Xu2dDbBUZ3nHfwhEBJPWFsnE2iFhpZIEQ8RkhkRbuTXtWKWKY2kxRb3j1zQ1hnasfHQqH4Njs461jfFjrAnFturVtlMtcYqUppnYMqMYpjATY2svSaopEo0kECEEcDtPeBcvl929u+d5zt19d/9nJhPu3XP+533/7/93n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/uYLE2py4bCAAAAAASUVORK5CYII="
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "VegaLite('https://raw.githubusercontent.com/vega/vega-lite/master/examples/specs/bar.vl.json')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 1,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
